package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.News;
import cn.wolfcode.trip.base.query.CollectionQuery;
import cn.wolfcode.trip.base.query.NewsQueryObject;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface NewsMapper {
    int insert(News record);

    News selectByPrimaryKey(@Param("id") Long id);

    List<News> selectAll();

    int updateByPrimaryKey(News record);

    List<News> selectForList(QueryObject qo);

    List<News> selectNews(CollectionQuery qo);

    int getNums(@Param("newsId") Long newsId, @Param("type") int type);

    int getPraiseNum(@Param("newsId") Long newsId, @Param("type") int type);
}